package c.c.a;

import android.content.Context;

public final class i extends b2 {
    public final Context e;
    public final g2 f;

    public i(Context context, g2 g2Var) {
        super(true, false);
        this.e = context;
        this.f = g2Var;
    }

    /* JADX WARNING: Removed duplicated region for block: B:27:0x0088  */
    /* JADX WARNING: Missing block: B:15:0x0070, code skipped:
            if (r9 != false) goto L_0x007e;
     */
    /* JADX WARNING: Missing block: B:22:0x007c, code skipped:
            if (r9 != false) goto L_0x007e;
     */
    /* JADX WARNING: Missing block: B:23:0x007e, code skipped:
            r4.a.unlock();
     */
    public boolean b(org.json.JSONObject r17) {
        /*
        r16 = this;
        r1 = r16;
        r0 = r1.f;
        r0 = r0.e;
        r0 = r1.e;
        r2 = c.c.a.t0.a;
        r2 = android.os.SystemClock.elapsedRealtime();
        r4 = c.c.a.t0.b;
        r5 = 1;
        r6 = new java.lang.Object[r5];
        r7 = 0;
        r6[r7] = r0;
        r0 = r4.b(r6);
        r4 = r0;
        r4 = (c.c.a.c1) r4;
        r0 = r4.c;
        r6 = " ms";
        r8 = 0;
        if (r0 != 0) goto L_0x0027;
    L_0x0024:
        r0 = r8;
        goto L_0x00ac;
    L_0x0027:
        r4.a();
        r0 = c.c.a.c1.j;
        r9 = c.c.a.u0.b;
        r10 = 2;
        if (r9 == 0) goto L_0x003a;
    L_0x0031:
        r11 = c.c.a.u0.a;
        if (r11 > r10) goto L_0x003a;
    L_0x0035:
        r11 = "Oaid#getOaid timeoutMills=100";
        r9.logV(r0, r11, r8);
    L_0x003a:
        r9 = r4.g;
        if (r9 != 0) goto L_0x008e;
    L_0x003e:
        r11 = android.os.SystemClock.elapsedRealtime();
        r9 = r4.a;	 Catch:{ InterruptedException -> 0x0077, all -> 0x0075 }
        r13 = java.util.concurrent.TimeUnit.MILLISECONDS;	 Catch:{ InterruptedException -> 0x0077, all -> 0x0075 }
        r14 = 100;
        r9 = r9.tryLock(r14, r13);	 Catch:{ InterruptedException -> 0x0077, all -> 0x0075 }
        r13 = new java.lang.StringBuilder;	 Catch:{ InterruptedException -> 0x0073 }
        r13.<init>();	 Catch:{ InterruptedException -> 0x0073 }
        r14 = "Oaid#getOaid locked=";
        r13.append(r14);	 Catch:{ InterruptedException -> 0x0073 }
        r13.append(r9);	 Catch:{ InterruptedException -> 0x0073 }
        r14 = ", took ";
        r13.append(r14);	 Catch:{ InterruptedException -> 0x0073 }
        r14 = android.os.SystemClock.elapsedRealtime();	 Catch:{ InterruptedException -> 0x0073 }
        r14 = r14 - r11;
        r13.append(r14);	 Catch:{ InterruptedException -> 0x0073 }
        r13.append(r6);	 Catch:{ InterruptedException -> 0x0073 }
        r11 = r13.toString();	 Catch:{ InterruptedException -> 0x0073 }
        c.c.a.u0.a(r0, r11, r8);	 Catch:{ InterruptedException -> 0x0073 }
        if (r9 == 0) goto L_0x008e;
    L_0x0072:
        goto L_0x007e;
    L_0x0073:
        r0 = move-exception;
        goto L_0x0079;
    L_0x0075:
        r0 = move-exception;
        goto L_0x0086;
    L_0x0077:
        r0 = move-exception;
        r9 = 0;
    L_0x0079:
        r0.printStackTrace();	 Catch:{ all -> 0x0084 }
        if (r9 == 0) goto L_0x008e;
    L_0x007e:
        r0 = r4.a;
        r0.unlock();
        goto L_0x008e;
    L_0x0084:
        r0 = move-exception;
        r7 = r9;
    L_0x0086:
        if (r7 == 0) goto L_0x008d;
    L_0x0088:
        r2 = r4.a;
        r2.unlock();
    L_0x008d:
        throw r0;
    L_0x008e:
        r0 = c.c.a.c1.j;
        r9 = "Oaid#getOaid return apiMap=";
        r9 = c.b.a.a.a.g(r9);
        r11 = r4.g;
        r9.append(r11);
        r9 = r9.toString();
        r11 = c.c.a.u0.b;
        if (r11 == 0) goto L_0x00aa;
    L_0x00a3:
        r12 = c.c.a.u0.a;
        if (r12 > r10) goto L_0x00aa;
    L_0x00a7:
        r11.logV(r0, r9, r8);
    L_0x00aa:
        r0 = r4.g;
    L_0x00ac:
        r4 = new java.lang.StringBuilder;
        r4.<init>();
        r9 = c.c.a.t0.a;
        r4.append(r9);
        r9 = "getOaid takes ";
        r4.append(r9);
        r9 = android.os.SystemClock.elapsedRealtime();
        r9 = r9 - r2;
        r4.append(r9);
        r4.append(r6);
        r2 = r4.toString();
        r3 = "TrackerDr";
        c.c.a.u0.a(r3, r2, r8);
        if (r0 == 0) goto L_0x00de;
    L_0x00d1:
        r2 = new org.json.JSONObject;
        r2.<init>(r0);
        r0 = "oaid";
        r3 = r17;
        r3.put(r0, r2);
        return r5;
    L_0x00de:
        return r7;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.c.a.i.b(org.json.JSONObject):boolean");
    }
}
